﻿using SD.Infrastructure.EntityBase;
using System;

namespace SlamDunk.MES.Domain.Entities.DefinitionContext
{
    /// <summary>
    /// 工艺段设备规范
    /// </summary>
    [Serializable]
    public class SegmentEquipmentRule : PlainEntity, ISortable
    {
        #region # 构造器

        #region 00.无参构造器
        /// <summary>
        /// 无参构造器
        /// </summary>
        protected SegmentEquipmentRule() { }
        #endregion

        #region 01.创建工艺段设备规范构造器
        /// <summary>
        /// 创建工艺段设备规范构造器
        /// </summary>
        /// <param name="equipmentClassId">设备类Id</param>
        /// <param name="equipmentId">设备Id</param>
        /// <param name="equipmentUse">设备用途</param>
        /// <param name="quantity">数量</param>
        /// <param name="facilityId">工厂模型Id</param>
        /// <param name="sort">排序</param>
        /// <param name="description">描述</param>
        public SegmentEquipmentRule(Guid? equipmentClassId, Guid? equipmentId, string equipmentUse, decimal? quantity, Guid? facilityId, int sort, string description)
            : this()
        {
            this.EquipmentClassId = equipmentClassId;
            this.EquipmentId = equipmentId;
            this.EquipmentUse = equipmentUse;
            this.Quantity = quantity;
            this.FacilityId = facilityId;
            this.Sort = sort;
            this.Description = description;
        }
        #endregion

        #endregion

        #region # 属性

        #region 设备类Id —— Guid? EquipmentClassId
        /// <summary>
        /// 设备类Id
        /// </summary>
        public Guid? EquipmentClassId { get; private set; }
        #endregion

        #region 设备Id —— Guid? EquipmentId
        /// <summary>
        /// 设备Id
        /// </summary>
        public Guid? EquipmentId { get; private set; }
        #endregion

        #region 设备用途 —— string EquipmentUse
        /// <summary>
        /// 设备用途
        /// </summary>
        public string EquipmentUse { get; private set; }
        #endregion

        #region 数量 —— decimal? Quantity
        /// <summary>
        /// 数量
        /// </summary>
        public decimal? Quantity { get; private set; }
        #endregion

        #region 工厂模型Id —— Guid? FacilityId 
        /// <summary>
        /// 工厂模型Id
        /// </summary>
        public Guid? FacilityId { get; private set; }
        #endregion

        #region 排序 —— int Sort
        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; private set; }
        #endregion

        #region 描述 —— string Description
        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; private set; }
        #endregion

        #region 导航属性 - 工艺段 —— ProcessSegment ProcessSegment
        /// <summary>
        /// 导航属性 - 工艺段
        /// </summary>
        public virtual ProcessSegment ProcessSegment { get; internal set; }
        #endregion

        #endregion
    }
}
